﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AmuTools;
using app.Api;

namespace app.Models
{
    /*
        日志
    */

    [Model(TableName = "t_log", PrimaryKey = "id", IdentityInsert = true)]
    public class Log
    {
        [Field(Description = "日志唯一标识符")]
        public int id { get; set; }
        [Field(Description = "用户角色：1游客，2管理员，3个人，4企业，5服务机构")]
        public int role_type { get; set; } // 角色
        [Field(Description = "用户id")]
        public string user_id { get; set; }
        [Field(Description = "用户名")]
        public string username { get; set; }
        [Field(Description = "操作：11添加，12删除，13修改，14查看，15审核，16导入，17导出，18上传，19设为公开，20保存模板，21备份数据库，22还原数据库，23下载，32登录，41找回密码，42注册")]
        public string operation { get; set; }
        [Field(Description = "操作的具体描述")]
        public string description { get; set; }
        [Field(Description = "用户ip")]
        public string ip { get; set; }
        [Field(Description = "用户ip位置")]
        public string ip_location { get; set; }
        [Field(DataType = "char(13)",Description = "日志记录创建时间")]
        public string create_time { get; set; }
        [Field(Description = "日志状态")]
        public int status { get; set; }

        [Field(Webable = false)]
        public int is_delete { get; set; }
    }
}